﻿using WaveLib.AudioMixer;

namespace TopVisionVideoStream
{
    class AudioDevice
    {
        public MixerDetail Detail;

        public string Name { get { return Detail.MixerName; } }
        public int DeviceID { get { return Detail.DeviceId; } }
        Mixer mixer;
        public Mixer Mixer
        {
            get
            {
                mixer.DeviceId = DeviceID;
                return mixer;
            }

            set
            {
                mixer = value;
            }
        }

        public int Volume
        {
            get
            {
                return Mixer.Lines[0].Volume;
            }
            set
            {
                Mixer.Lines[0].Volume = value;
            }
        }

        public bool Mute
        {
            get
            {
                return Mixer.Lines[0].Mute;
            }
            set
            {
                Mixer.Lines[0].Mute = value;
            }
        }


        public AudioDevice(MixerDetail md)
        {
            Detail = md;
        }
    }
}
